import java.awt.event.*;
import javax.swing.*;

public class GUIkeyboard extends JTextField implements ActionListener{
	private GUI gui;
	private GUIchannel guiChannel;

	public GUIkeyboard(GUI gui) {
		this.gui = gui;
	}
	
	public GUIkeyboard(GUIchannel guiChannel, GUI gui) {
		this.gui = gui;
		this.guiChannel = guiChannel;
	}	
	
	public void actionPerformed(ActionEvent e) {
		if(guiChannel == null) {
			gui.sendMsg();
		} else {
			guiChannel.sendMsg();
		}
	}

}
